﻿using JESAI.Redis.Abstracts.Commands;
using System;
using System.Collections.Generic;
using System.Text;

namespace JESAI.Redis.Events
{
    public class CommandExecutedEventArgs : EventArgs
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <param name="value"></param>
        /// <param name="ex"></param>
        internal CommandExecutedEventArgs(IRedisCommandArg commandArg, object value, Exception ex = null)
        {
            CommandArg = commandArg;
            Value = value;
            Ex = ex;
        }

        /// <summary>
        /// 指令
        /// </summary>
        public IRedisCommandArg CommandArg { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        public object Value { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public Exception? Ex { get; set; }
    }
}
